package com.cyn.controller;

import com.cyn.controller.rabbitmq.HelloSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("demo")
public class DemoController {

    @Autowired
    private HelloSender helloSender;

    @GetMapping("testk")
    public Map<String,Object> test111() {
        for (int i = 0; i < 10; i++) {
            helloSender.send(i);
        }

        return null;
    }

}